package com.shengyin.ec.service.account;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shengyin.ec.model.dao.account.BookInfoDao;
import com.shengyin.ec.model.entity.BookInfo;

@Service("bookInfoService")
public class BookInfoServiceImpl  implements BookInfoService{
	
	@Autowired
	BookInfoDao bookInfoDao;
	
	@Override
	public List<BookInfo> getBookInfoListById(long id){
		List<BookInfo> bookInfoList = bookInfoDao.getBookInfoListById(id);
		return bookInfoList;
	}
	
	@Override
	public void createBookInfo(BookInfo bookInfo){
		bookInfoDao.save(bookInfo);
	}
	
	@Override
	public List<BookInfo> getBookInfoListByKeywords(String keyword){
		return bookInfoDao.getBookInfoListByKeywords(keyword);
	}
	@Override
	public List<BookInfo> getBookInfoListByStatus(long id){
		return bookInfoDao.getBookInfoListByStatus(id);
	}
	@Override
	public List<BookInfo> getBookInfoListByBookItem(long id){
		return bookInfoDao.getBookInfoListByBookItem(id);
	}
}